\(\int \frac {x (-2 \sqrt [3]{-\frac {a}{b}} C+C x)}{a-b x^3} \, dx\) [370]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 53 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {2 C \arctan \left (\frac {1-\frac {2 x}{\sqrt [3]{-\frac {a}{b}}}}{\sqrt {3}}\right )}{\sqrt {3} b}-\frac {C \log \left (\sqrt [3]{-\frac {a}{b}}+x\right )}{b} \]

[Out]

-C*ln((-a/b)^(1/3)+x)/b-2/3*C*arctan(1/3*(1-2*x/(-a/b)^(1/3))*3^(1/2))/b*3^(1/2)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {1881, 31, 631, 210} \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {2 C \arctan \left (\frac {1-\frac {2 x}{\sqrt [3]{-\frac {a}{b}}}}{\sqrt {3}}\right )}{\sqrt {3} b}-\frac {C \log \left (\sqrt [3]{-\frac {a}{b}}+x\right )}{b} \]

[In]

Int[(x*(-2*(-(a/b))^(1/3)*C + C*x))/(a - b*x^3),x]

[Out]

(-2*C*ArcTan[(1 - (2*x)/(-(a/b))^(1/3))/Sqrt[3]])/(Sqrt[3]*b) - (C*Log[(-(a/b))^(1/3) + x])/b

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1881

Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x,
 2]}, With[{q = (a/b)^(1/3)}, Dist[C/b, Int[1/(q + x), x], x] + Dist[(B + C*q)/b, Int[1/(q^2 - q*x + x^2), x],
 x]] /; EqQ[A - (a/b)^(1/3)*B - 2*(a/b)^(2/3)*C, 0]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]

Rubi steps \begin{align*} \text {integral}& = -\frac {C \int \frac {1}{\sqrt [3]{-\frac {a}{b}}+x} \, dx}{b}+\frac {\left (\sqrt [3]{-\frac {a}{b}} C\right ) \int \frac {1}{\left (-\frac {a}{b}\right )^{2/3}-\sqrt [3]{-\frac {a}{b}} x+x^2} \, dx}{b} \\ & = -\frac {C \log \left (\sqrt [3]{-\frac {a}{b}}+x\right )}{b}+\frac {(2 C) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 x}{\sqrt [3]{-\frac {a}{b}}}\right )}{b} \\ & = -\frac {2 C \tan ^{-1}\left (\frac {1-\frac {2 x}{\sqrt [3]{-\frac {a}{b}}}}{\sqrt {3}}\right )}{\sqrt {3} b}-\frac {C \log \left (\sqrt [3]{-\frac {a}{b}}+x\right )}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(149\) vs. \(2(53)=106\).

Time = 0.08 (sec) , antiderivative size = 149, normalized size of antiderivative = 2.81 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {C \left (-2 \sqrt {3} \sqrt [3]{-\frac {a}{b}} \sqrt [3]{b} \arctan \left (\frac {1+\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a}}}{\sqrt {3}}\right )-2 \sqrt [3]{-\frac {a}{b}} \sqrt [3]{b} \log \left (\sqrt [3]{a}-\sqrt [3]{b} x\right )+\sqrt [3]{-\frac {a}{b}} \sqrt [3]{b} \log \left (a^{2/3}+\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )+\sqrt [3]{a} \log \left (a-b x^3\right )\right )}{3 \sqrt [3]{a} b} \]

[In]

Integrate[(x*(-2*(-(a/b))^(1/3)*C + C*x))/(a - b*x^3),x]

[Out]

-1/3*(C*(-2*Sqrt[3]*(-(a/b))^(1/3)*b^(1/3)*ArcTan[(1 + (2*b^(1/3)*x)/a^(1/3))/Sqrt[3]] - 2*(-(a/b))^(1/3)*b^(1
/3)*Log[a^(1/3) - b^(1/3)*x] + (-(a/b))^(1/3)*b^(1/3)*Log[a^(2/3) + a^(1/3)*b^(1/3)*x + b^(2/3)*x^2] + a^(1/3)
*Log[a - b*x^3]))/(a^(1/3)*b)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(118\) vs. \(2(46)=92\).

Time = 1.50 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.25

method result size
default \(C \left (-2 \left (-\frac {a}{b}\right )^{\frac {1}{3}} \left (-\frac {\ln \left (x -\left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}+\frac {\ln \left (x^{2}+\left (\frac {a}{b}\right )^{\frac {1}{3}} x +\left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}-\frac {\sqrt {3}\, \arctan \left (\frac {\left (1+\frac {2 x}{\left (\frac {a}{b}\right )^{\frac {1}{3}}}\right ) \sqrt {3}}{3}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )-\frac {\ln \left (-b \,x^{3}+a \right )}{3 b}\right )\) \(119\)

[In]

int(x*(-2*(-a/b)^(1/3)*C+C*x)/(-b*x^3+a),x,method=_RETURNVERBOSE)

[Out]

C*(-2*(-a/b)^(1/3)*(-1/3/b/(a/b)^(1/3)*ln(x-(a/b)^(1/3))+1/6/b/(a/b)^(1/3)*ln(x^2+(a/b)^(1/3)*x+(a/b)^(2/3))-1
/3*3^(1/2)/b/(a/b)^(1/3)*arctan(1/3*(1+2/(a/b)^(1/3)*x)*3^(1/2)))-1/3*ln(-b*x^3+a)/b)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {2 \, \sqrt {3} C \arctan \left (\frac {2 \, \sqrt {3} b x \left (-\frac {a}{b}\right )^{\frac {2}{3}} + \sqrt {3} a}{3 \, a}\right ) + 3 \, C \log \left (x + \left (-\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \, b} \]

[In]

integrate(x*(-2*(-a/b)^(1/3)*C+C*x)/(-b*x^3+a),x, algorithm="fricas")

[Out]

-1/3*(2*sqrt(3)*C*arctan(1/3*(2*sqrt(3)*b*x*(-a/b)^(2/3) + sqrt(3)*a)/a) + 3*C*log(x + (-a/b)^(1/3)))/b

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.16 (sec) , antiderivative size = 110, normalized size of antiderivative = 2.08 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=- \frac {C \left (\log {\left (- \frac {a}{b \left (- \frac {a}{b}\right )^{\frac {2}{3}}} + x \right )} - \frac {\sqrt {3} i \log {\left (\frac {a}{2 b \left (- \frac {a}{b}\right )^{\frac {2}{3}}} - \frac {\sqrt {3} i a}{2 b \left (- \frac {a}{b}\right )^{\frac {2}{3}}} + x \right )}}{3} + \frac {\sqrt {3} i \log {\left (\frac {a}{2 b \left (- \frac {a}{b}\right )^{\frac {2}{3}}} + \frac {\sqrt {3} i a}{2 b \left (- \frac {a}{b}\right )^{\frac {2}{3}}} + x \right )}}{3}\right )}{b} \]

[In]

integrate(x*(-2*(-a/b)**(1/3)*C+C*x)/(-b*x**3+a),x)

[Out]

-C*(log(-a/(b*(-a/b)**(2/3)) + x) - sqrt(3)*I*log(a/(2*b*(-a/b)**(2/3)) - sqrt(3)*I*a/(2*b*(-a/b)**(2/3)) + x)
/3 + sqrt(3)*I*log(a/(2*b*(-a/b)**(2/3)) + sqrt(3)*I*a/(2*b*(-a/b)**(2/3)) + x)/3)/b

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 166 vs. \(2 (46) = 92\).

Time = 0.35 (sec) , antiderivative size = 166, normalized size of antiderivative = 3.13 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {{\left (C \left (\frac {a}{b}\right )^{\frac {1}{3}} + C \left (-\frac {a}{b}\right )^{\frac {1}{3}}\right )} \log \left (x^{2} + x \left (\frac {a}{b}\right )^{\frac {1}{3}} + \left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{3 \, b \left (\frac {a}{b}\right )^{\frac {1}{3}}} - \frac {{\left (C \left (\frac {a}{b}\right )^{\frac {1}{3}} - 2 \, C \left (-\frac {a}{b}\right )^{\frac {1}{3}}\right )} \log \left (x - \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \, b \left (\frac {a}{b}\right )^{\frac {1}{3}}} - \frac {2 \, \sqrt {3} {\left (C a - {\left (3 \, C \left (\frac {a}{b}\right )^{\frac {2}{3}} \left (-\frac {a}{b}\right )^{\frac {1}{3}} + \frac {C a}{b}\right )} b\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )}{9 \, a b} \]

[In]

integrate(x*(-2*(-a/b)^(1/3)*C+C*x)/(-b*x^3+a),x, algorithm="maxima")

[Out]

-1/3*(C*(a/b)^(1/3) + C*(-a/b)^(1/3))*log(x^2 + x*(a/b)^(1/3) + (a/b)^(2/3))/(b*(a/b)^(1/3)) - 1/3*(C*(a/b)^(1
/3) - 2*C*(-a/b)^(1/3))*log(x - (a/b)^(1/3))/(b*(a/b)^(1/3)) - 2/9*sqrt(3)*(C*a - (3*C*(a/b)^(2/3)*(-a/b)^(1/3
) + C*a/b)*b)*arctan(1/3*sqrt(3)*(2*x + (a/b)^(1/3))/(a/b)^(1/3))/(a*b)

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.15 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=-\frac {{\left (C b \left (\frac {a}{b}\right )^{\frac {2}{3}} - 2 \, \left (-a b^{2}\right )^{\frac {1}{3}} C \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )} \left (\frac {a}{b}\right )^{\frac {1}{3}} \log \left ({\left | x - \left (\frac {a}{b}\right )^{\frac {1}{3}} \right |}\right )}{3 \, a b} + \frac {\sqrt {3} {\left (a b^{2} + i \, \sqrt {3} \sqrt {a^{2} b^{4}}\right )} C \arctan \left (\frac {\sqrt {3} {\left (2 \, x + \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )}{3 \, a b^{3}} \]

[In]

integrate(x*(-2*(-a/b)^(1/3)*C+C*x)/(-b*x^3+a),x, algorithm="giac")

[Out]

-1/3*(C*b*(a/b)^(2/3) - 2*(-a*b^2)^(1/3)*C*(a/b)^(1/3))*(a/b)^(1/3)*log(abs(x - (a/b)^(1/3)))/(a*b) + 1/3*sqrt
(3)*(a*b^2 + I*sqrt(3)*sqrt(a^2*b^4))*C*arctan(1/3*sqrt(3)*(2*x + (a/b)^(1/3))/(a/b)^(1/3))/(a*b^3)

Mupad [B] (verification not implemented)

Time = 11.04 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.94 \[ \int \frac {x \left (-2 \sqrt [3]{-\frac {a}{b}} C+C x\right )}{a-b x^3} \, dx=\sum _{k=1}^3\ln \left (-\frac {C^2\,a+{\mathrm {root}\left (27\,a\,b^3\,z^3+27\,C\,a\,b^2\,z^2+9\,C^2\,a\,b\,z+9\,C^3\,a,z,k\right )}^2\,a\,b^2\,9+C\,\mathrm {root}\left (27\,a\,b^3\,z^3+27\,C\,a\,b^2\,z^2+9\,C^2\,a\,b\,z+9\,C^3\,a,z,k\right )\,a\,b\,6-4\,C^2\,b\,x\,{\left (-\frac {a}{b}\right )}^{2/3}}{b^3}\right )\,\mathrm {root}\left (27\,a\,b^3\,z^3+27\,C\,a\,b^2\,z^2+9\,C^2\,a\,b\,z+9\,C^3\,a,z,k\right ) \]

[In]

int((x*(C*x - 2*C*(-a/b)^(1/3)))/(a - b*x^3),x)

[Out]

symsum(log(-(C^2*a + 9*root(27*a*b^3*z^3 + 27*C*a*b^2*z^2 + 9*C^2*a*b*z + 9*C^3*a, z, k)^2*a*b^2 + 6*C*root(27
*a*b^3*z^3 + 27*C*a*b^2*z^2 + 9*C^2*a*b*z + 9*C^3*a, z, k)*a*b - 4*C^2*b*x*(-a/b)^(2/3))/b^3)*root(27*a*b^3*z^
3 + 27*C*a*b^2*z^2 + 9*C^2*a*b*z + 9*C^3*a, z, k), k, 1, 3)